<?PHP

function sanatizeText($str) {
	if (get_magic_quotes_gpc()) stripslashes($str);

	$str = htmlspecialchars($str);
	$str = trim($str);
	
	return $str;
}





function array_fill_keys($array, $new_value) {
    if (is_array($array)) {
        foreach($array as $key => $value) {
            $result[$array[$key]] = $new_value;
        }
    }

    return $result;
}





function getStyle($have, $need)
{
	if ($have < $need) return 'red';
	else return 'green';
}

?>